package com.xie.smfs.client.renderer;

import com.xie.smfs.block.entity.GhostCoffinBlockEntity;
import net.minecraft.client.render.block.entity.BlockEntityRendererFactory;
import net.minecraft.util.Identifier;
import software.bernie.geckolib.model.GeoModel;
import software.bernie.geckolib.renderer.GeoBlockRenderer;

public class CoffinBlockRenderer extends GeoBlockRenderer<GhostCoffinBlockEntity> {

    public CoffinBlockRenderer(BlockEntityRendererFactory.Context ctx) {
        super(new GeoModel<GhostCoffinBlockEntity>() {
            @Override
            public Identifier getModelResource(GhostCoffinBlockEntity animatable) {
                return new Identifier("smfs", "geo/ghost_coffin.geo.json");
            }

            @Override
            public Identifier getTextureResource(GhostCoffinBlockEntity animatable) {
                return new Identifier("smfs", "textures/block/ghost_coffin.png");
            }

            @Override
            public Identifier getAnimationResource(GhostCoffinBlockEntity animatable) {
                // 如果有动画文件，返回动画路径
                return new Identifier("smfs", "animations/ghost_coffin.animation.json");
            }
        });
    }
}